package ma.co.ba.BusinessApplications.business.projets.impl;

import java.util.List;

import ma.co.ba.BusinessApplications.business.projets.ProjetBusiness;
import ma.co.ba.BusinessApplications.dao.commons.DAOServices;
import ma.co.ba.BusinessApplications.model.Projet;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service("projetBusiness")
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public class ProjetBusinessImpl implements ProjetBusiness {

	@Autowired
	DAOServices daoServices;

	public Projet getProjetById(int id) {
		return (Projet) daoServices.getEntityById2(Projet.class, id);
	}

	public List<Projet> getAllProjets() {
		return daoServices.getEntities(Projet.class);
	}

}
